package com.ruoyi.evalution.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.evalution.mapper.LabEvalutionUserMapper;
import com.ruoyi.evalution.domain.LabEvalutionUser;
import com.ruoyi.evalution.service.ILabEvalutionUserService;

/**
 * 评测人员Service业务层处理
 * 
 * @author winner pan
 * @date 2022-04-15
 */
@Service
public class LabEvalutionUserServiceImpl implements ILabEvalutionUserService {
	@Autowired
	private LabEvalutionUserMapper labEvalutionUserMapper;

	/**
	 * 查询评测人员
	 * 
	 * @param evalutionUserId
	 *            评测人员ID
	 * @return 评测人员
	 */
	@Override
	public LabEvalutionUser selectLabEvalutionUserById(Long evalutionUserId) {
		return labEvalutionUserMapper.selectLabEvalutionUserById(evalutionUserId);
	}

	/**
	 * 查询评测人员列表
	 * 
	 * @param labEvalutionUser
	 *            评测人员
	 * @return 评测人员
	 */
	@Override
	public List<LabEvalutionUser> selectLabEvalutionUserList(LabEvalutionUser labEvalutionUser) {
		return labEvalutionUserMapper.selectLabEvalutionUserList(labEvalutionUser);
	}

	/**
	 * 新增评测人员
	 * 
	 * @param labEvalutionUser
	 *            评测人员
	 * @return 结果
	 */
	@Override
	public int insertLabEvalutionUser(LabEvalutionUser labEvalutionUser) {
		return labEvalutionUserMapper.insertLabEvalutionUser(labEvalutionUser);
	}

	/**
	 * 修改评测人员
	 * 
	 * @param labEvalutionUser
	 *            评测人员
	 * @return 结果
	 */
	@Override
	public int updateLabEvalutionUser(LabEvalutionUser labEvalutionUser) {
		return labEvalutionUserMapper.updateLabEvalutionUser(labEvalutionUser);
	}

	/**
	 * 批量删除评测人员
	 * 
	 * @param evalutionUserIds
	 *            需要删除的评测人员ID
	 * @return 结果
	 */
	@Override
	public int deleteLabEvalutionUserByIds(Long[] evalutionUserIds) {
		return labEvalutionUserMapper.deleteLabEvalutionUserByIds(evalutionUserIds);
	}

	/**
	 * 删除评测人员信息
	 * 
	 * @param evalutionUserId
	 *            评测人员ID
	 * @return 结果
	 */
	@Override
	public int deleteLabEvalutionUserById(Long evalutionUserId) {
		return labEvalutionUserMapper.deleteLabEvalutionUserById(evalutionUserId);
	}
	
	public int deleteLabEvalutionUserByEvalution(Long evalutionId){
		return labEvalutionUserMapper.deleteLabEvalutionUserByEvalution(evalutionId);
	}
}
